<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>title</title>
      <link rel="stylesheet" type="text/css" href="../css/api.css"/>
            <link rel="stylesheet" type="text/css" href="../css/animate.css"/>
                  <link rel="stylesheet" type="text/css" href="../css/scrollmenu.css"/>
      <style>
	  div:focus {outline: none;}
          body{
background: #ededed
          }
          #wrap{
background: #ededed; padding: 15px; padding-top: 0px;
          }
         .sj{color: #fff; text-align: center; height:30px;line-height:30px ;font-size: 12px; }
         .xx{background-color: #fff; padding: 10px;border-radius:3px; font-size: 12px;color: #999999; line-height: 20px;}
            .x{ border-bottom: 0.8px solid #f9f9f9; height: 5px}
            .nr{ padding-top: 10px;   text-align: center;word-break:break-all;}
            .wz{padding-top: 10px;   text-align: left; color: #000000;font-size: 14px;word-wrap:break-word}
            .nr img{width: 90px}
            .zfyt{text-align: center;font-size: 14px; color: #576b95;line-height: 25px; padding-top: 10px}
.jg{height: 20px;width: 100%}
.sjr{width: 100%; overflow: hidden;height: 23px}
.list_img img{height: 16px}
      </style>
  </head>
  <body>
<div id="wrap">









</div>


  </body>
  <script type="text/javascript" src="../script/api.js"></script>

  <script  type="text/javascript"  src="../script/jquery-2.1.1.min.js"></script>
   <script  type="text/javascript"  src="../script/jquery.md5.js"></script>
  <script type="text/javascript" src="../script/common.js"></script>
  <script type="text/javascript" src="../script/doT.min.js"></script>
      <script type="text/javascript" src="../script/jquery.mobile-1.4.5.min.js"></script>
            <script type="text/javascript" src="../script/bscroll.js"></script>
                      <script type="text/javascript" src="../script/scrollmenu.js"></script>
  <script type="text/x-dot-template" id="category_template">
 <div class="sj" id="sj">    </div>
  {{~ it  : value : index }}


<div class="xx" id="xx{{=value.id}}1">
  <div class="sjr">{{=value.title}}位收件人：</div>
  <div class="sjr">{{=value.user}}</div>
    <div class="x"> </div>
    <div class="nr" >

<img src='../image/default1.png' tapmode  onclick="openwin('imgview','{{=value.thumb }}')"     srcs="{{= value.thumb }}"  class="imgCache"   >


    </div>
    <div class="x"> </div>

    <div class="zfyt " tapmode onclick="openwin('qunfa','{{=value.id}}' )">
 再发一条
    </div>

</div>

<div class="jg"></div>



 <div class="xx" id="xx{{=value.id}}2">
   <div class="sjr">{{=value.title}}位收件人：</div>
   <div class="sjr">{{=value.user}}</div>
     <div class="x"> </div>
     <div class=" list_img wz" >
     {{=value.content}}
    </div>
     <div class="x"> </div>
     <div class="zfyt" tapmode onclick="openwin('qunfa',  '{{=value.id}}')">
  再发一条
     </div>
 </div>
<div class="jg"></div>


{{ if(value.ts==4){ }}


<div class="xx" id="xx{{=value.id}}3">
  <div class="sjr">{{=value.title2}}位收件人：</div>
  <div class="sjr">{{=value.user2}}</div>
    <div class="x"> </div>
    <div class="nr" >

<img src='../image/default1.png' tapmode  onclick="openwin('imgview','{{=value.thumb }}')"     srcs="{{= value.thumb }}"  class="imgCache"   >


    </div>
    <div class="x"> </div>

    <div class="zfyt " tapmode onclick="openwin('qunfa','{{=value.id}}' )">
 再发一条
    </div>

</div>

<div class="jg"></div>



 <div class="xx" id="xx{{=value.id}}4">
   <div class="sjr">{{=value.title2}}位收件人：</div>
   <div class="sjr">{{=value.user2}}</div>
     <div class="x"> </div>
     <div class=" list_img wz" >
     {{=value.content}}
    </div>
     <div class="x"> </div>
     <div class="zfyt" tapmode onclick="openwin('qunfa',  '{{=value.id}}')">
  再发一条
     </div>
 </div>
<div class="jg"></div>
{{
}

}}

  	{{~}}
  </script>
  <script type="text/javascript">


  function showListbscroll(id){
  	$("body").scrollmenu({
  		type:'cross',
  		hasLineBorder:false,
  		// bscroll:true,
  		// animateIn:'bounceIn',
  		// animateOut:'bounceOut',

  		click:function(ret){

        api.setFrameAttr({
            name: 'qfzsFrame',
            rect: {
              x:0,
              y:api.safeArea.top+50,
               w: 'auto',
               h:  api.winHeight-56-api.safeArea.top- 50-api.safeArea.bottom
            }
        });

        					 var jsfun = 'hide();';
        api.execScript({
            script: jsfun
        });



  		       if(ret.index==0){
			    $api.css($api.byId(id),'display:none;');
          count--;

          if(count==0){
              console.log(count);

              var jsfun = 'xjqf();';
              api.execScript({
                  script: jsfun
              });

              api.sendEvent({
                              name: 'hideqf',

                          });




          }
			   }
  				//alert(JSON.stringify(ret));

  		}
  	});
  }


function PhotoViewer(url ){

var mycars=new Array()
mycars[0]=localStorage.getItem('domain')+url
console.log(url)
  var UIPhotoViewer = api.require('UIPhotoViewer');
  UIPhotoViewer.open({
      images:mycars,
      gestureClose:true,
      placeholderImg: 'widget://res/img/apicloud.png',
      bgColor: '#000'
  }, function(ret, err) {

if(ret.eventType=='click'){
  UIPhotoViewer.hide();
}
  });

  }




  function openwin(name,id){

    api.openWin({
        name: name,
        url: './'+name+'.html',
        pageParam: {
          id:id,



        },

    });


  }
var count;
      apiready = function(){

        var winHeight = api.winHeight;
               h=winHeight-50-api.safeArea.top- api.safeArea.bottom -56
               $api.css($api.byId('wrap'),'min-height:'+h+'px;');

               api.ajax({
            url:localStorage.getItem('domain') +'/Home/index/qfzs',
           method: 'get',

               },function(ret,err){
 console.log( JSON.stringify(  ret ) );
                 var category = $api.byId('wrap');
                  var category_template = $api.byId('category_template');

                 pagefn = doT.template(category_template.text);
                   category.innerHTML = pagefn(ret.list);

count=ret.list[0].ts ;
  $api.html($api.byId('sj'), api.pageParam.t );





        _zyzImgCache();

imageCache();



$(".xx").on("taphold",function(){
showListbscroll($(this).attr("id"))
api.setFrameAttr({
    name: 'qfzsFrame',
    rect: {
      x:0,
      y:api.safeArea.top+50,
       w: 'auto',
      h:  api.winHeight- 50
    }
});
var jsfun = 'show();';
api.execScript({
    script: jsfun
});
});

  })


      };
  </script>
  </html>
